This file is used to analyse the immune cells dataset.
library(dplyr)
library(patchwork)
library(ggplot2)
library(ComplexHeatmap)
.libPaths()
## [1] "/usr/local/lib/R/library"
In this section, we set the global settings of the analysis. We will store data there :
save_name = "immune_cells"
out_dir = "."
We load the dataset :
sobj = readRDS(paste0(out_dir, "/", save_name, "_sobj.rds"))
sobj
## An object of class Seurat
## 15121 features across 2329 samples within 1 assay
## Active assay: RNA (15121 features, 2000 variable features)
## 6 dimensional reductions calculated: RNA_pca, RNA_pca_20_tsne, RNA_pca_20_umap, harmony, harmony_20_umap, harmony_20_tsne
We load the sample information :
sample_info = readRDS(paste0(out_dir, "/../../1_metadata/hs_hd_sample_info.rds"))
project_names_oi = sample_info$project_name
graphics::pie(rep(1, nrow(sample_info)),
col = sample_info$color,
labels = sample_info$project_name)
Here are custom colors for each cell type :
color_markers = readRDS(paste0(out_dir, "/../../1_metadata/hs_hd_color_markers.rds"))
data.frame(cell_type = names(color_markers),
color = unlist(color_markers)) %>%
ggplot2::ggplot(., aes(x = cell_type, y = 0, fill = cell_type)) +
ggplot2::geom_point(pch = 21, size = 5) +
ggplot2::scale_fill_manual(values = unlist(color_markers), breaks = names(color_markers)) +
ggplot2::theme_classic() +
ggplot2::theme(legend.position = "none",
axis.line = element_blank(),
axis.title = element_blank(),
axis.ticks = element_blank(),
axis.text.y = element_blank(),
axis.text.x = element_text(angle = 30, hjust = 1))
This is the projection of interest :
name2D = "harmony_20_tsne"
We design a custom functions to represent cells of interest on the projection :
see_clusters = function(pop_oi = "DC") {
# Clusters containing population of interest
clusters_oi = names(which(cell_type_clusters == pop_oi))
# Colors for clusters
custom_colors = aquarius::gg_color_hue(length(levels(sobj$seurat_clusters)))
names(custom_colors) = levels(sobj$seurat_clusters)
custom_colors[!(names(custom_colors) %in% clusters_oi)] = "gray92"
p1 = Seurat::DimPlot(sobj, reduction = name2D, cols = custom_colors,
group.by = "seurat_clusters", label = TRUE) +
ggplot2::labs(title = "Clusters of interest",
subtitle = paste0(clusters_oi, collapse = ", ")) +
ggplot2::theme(aspect.ratio = 1,
plot.title = element_text(hjust = 0.5),
plot.subtitle = element_text(hjust = 0.5)) +
Seurat::NoAxes() + Seurat::NoLegend()
# Color for cell type
custom_colors = unlist(color_markers)
custom_colors[!(names(custom_colors) %in% pop_oi)] = "gray92"
p2 = Seurat::DimPlot(sobj, reduction = name2D,
group.by = "cell_type", cols = custom_colors) +
ggplot2::labs(title = "Annotation of interest",
subtitle = pop_oi) +
ggplot2::theme(aspect.ratio = 1,
plot.title = element_text(hjust = 0.5),
plot.subtitle = element_text(hjust = 0.5)) +
Seurat::NoAxes() + Seurat::NoLegend()
# Piechart for each cluster, by sample name
plot_list = lapply(clusters_oi, FUN = function(one_cluster) {
df = sobj@meta.data %>%
dplyr::filter(.data$seurat_clusters == .env$one_cluster) %>%
dplyr::select(sample_identifier, seurat_clusters)
p = aquarius::plot_piechart(df,
grouping_var = "sample_identifier",
colors = sample_info$color) +
ggplot2::labs(title = paste0("Cluster ", one_cluster),
subtitle = paste0(nrow(df), " cells")) +
ggplot2::theme(plot.title = element_text(hjust = 0.5),
plot.subtitle = element_text(hjust = 0.5))
return(p)
})
p3 = patchwork::wrap_plots(plot_list)
# Patchwork
p = patchwork::wrap_plots(p2, p1, p3, nrow = 1)
return(p)
}
We design a custom function to make the GSEA plot and a word cloud graph :
make_gsea_plot = function(gsea_results, gs_oi, fold_change, metric = "FC") {
fold_change$metric = fold_change[, metric]
plot_list = lapply(gs_oi, FUN = function(gene_set) {
# Gene set content
gs_content = gene_sets %>%
dplyr::filter(gs_name == gene_set) %>%
dplyr::pull(ensembl_gene) %>%
unique()
# Gene set size
nb_genes = length(gs_content)
# Enrichment metrics
NES = gsea_results@result[gene_set, "NES"]
p.adjust = gsea_results@result[gene_set, "p.adjust"] %>%
round(., 4)
qvalues = gsea_results@result[gene_set, "qvalues"]
if (p.adjust > 0.05) {
p.adjust = paste0("<span style='color:red;'>", p.adjust, "</span>")
}
my_subtitle = paste0("\nNES : ", round(NES, 2),
" | padj : ", p.adjust,
" | qval : ", round(qvalues, 4),
" | set size : ", nb_genes, " genes")
# Size limits
lower_FC = min(fold_change[gs_content, ]$metric, na.rm = TRUE)
upper_FC = max(fold_change[gs_content, ]$metric, na.rm = TRUE)
# Plot
p = enrichplot::gseaplot2(x = gsea_results, geneSetID = gene_set) +
ggplot2::labs(title = gene_set,
subtitle = my_subtitle) +
ggplot2::theme(plot.title = element_text(hjust = 0.5, face = "bold",
margin = ggplot2::margin(3, 3, 5, 3)),
plot.subtitle = ggtext::element_markdown(hjust = 0.5,
size = 10))
wc = ggplot2::ggplot(fold_change[gs_content, ],
aes(label = gene_name, size = abs(metric), color = metric)) +
ggwordcloud::geom_text_wordcloud_area(show.legend = TRUE) +
ggplot2::scale_color_gradient2(
name = metric,
low = aquarius::color_cnv[1],
mid = "gray70", midpoint = 0,
high = aquarius::color_cnv[3]) +
ggplot2::scale_size_area(max_size = 7) +
ggplot2::theme_minimal() +
ggplot2::guides(size = "none")
return(list(p, wc))
}) %>% unlist(., recursive = FALSE)
return(plot_list)
}
We visualize gene expression for some markers :
features = c("percent.mt", "percent.rb", "nFeature_RNA")
plot_list = lapply(features, FUN = function(one_gene) {
Seurat::FeaturePlot(sobj, features = one_gene,
reduction = name2D) +
ggplot2::theme(aspect.ratio = 1) +
ggplot2::scale_color_gradientn(colors = aquarius::color_gene) +
Seurat::NoAxes()
})
patchwork::wrap_plots(plot_list, ncol = 3)
We visualize clusters :
cluster_plot = Seurat::DimPlot(sobj, reduction = name2D, label = TRUE) +
Seurat::NoAxes() +
ggplot2::theme(aspect.ratio = 1)
cluster_plot
We visualize cell type split by sample :
plot_list = aquarius::plot_split_dimred(sobj,
reduction = name2D,
split_by = "project_name",
group_by = "cell_type",
split_color = setNames(sample_info$color,
nm = sample_info$project_name),
group_color = color_markers,
bg_pt_size = 0.5, main_pt_size = 0.5)
plot_list[[length(plot_list) + 1]] = cluster_plot
patchwork::wrap_plots(plot_list, ncol = 4) &
Seurat::NoLegend()
We summarize major cell type by cluster :
cell_type_clusters = sobj@meta.data[, c("cell_type", "seurat_clusters")] %>%
table() %>%
prop.table(., margin = 2) %>%
apply(., 2, which.max)
cell_type_clusters = setNames(levels(sobj$cell_type)[cell_type_clusters],
nm = names(cell_type_clusters))
We define cluster type :
sobj$cluster_type = cell_type_clusters[sobj$seurat_clusters] %>%
as.factor()
table(sobj$cluster_type, sobj$cell_type)
##
## CD4 T cells CD8 T cells Langerhans cells macrophages B cells
## B cells 0 0 0 0 30
## CD4 T cells 770 64 2 2 1
## CD8 T cells 91 533 1 0 5
## Langerhans cells 21 0 259 22 8
## macrophages 2 0 8 450 1
## proliferative 0 0 16 1 0
##
## cuticle cortex medulla IRS proliferative HF-SCs IFE basal
## B cells 0 0 0 0 0 0 0
## CD4 T cells 2 0 3 3 0 0 0
## CD8 T cells 0 0 0 0 0 0 0
## Langerhans cells 1 1 1 3 3 1 0
## macrophages 0 0 0 0 0 0 0
## proliferative 0 0 0 0 20 0 0
##
## IFE granular spinous ORS sebocytes
## B cells 0 0 0
## CD4 T cells 0 1 0
## CD8 T cells 0 0 0
## Langerhans cells 0 0 1
## macrophages 0 1 1
## proliferative 0 0 0
We subset color_markers :
color_markers = color_markers[levels(sobj$cluster_type)]
We compare cluster annotation and cell type annotation :
p1 = Seurat::DimPlot(sobj, group.by = "cell_type",
reduction = name2D, cols = color_markers) +
ggplot2::labs(title = "Cell type") +
Seurat::NoAxes() +
ggplot2::theme(aspect.ratio = 1,
plot.title = element_text(hjust = 0.5))
p2 = Seurat::DimPlot(sobj, group.by = "cluster_type",
reduction = name2D, cols = color_markers) +
ggplot2::labs(title = "Cluster type") +
Seurat::NoAxes() +
ggplot2::theme(aspect.ratio = 1,
plot.title = element_text(hjust = 0.5))
patchwork::wrap_plots(p1, p2, guides = "collect")
For each population, what are the differences between healthy donors (HD) and HS patients (HS) ? We save the results in a list :
list_results = list()
We make over-representation analysis for each group of genes. We load gene sets from MSigDB :
gene_sets = aquarius::get_gene_sets(species = "Homo sapiens")
gene_sets = gene_sets$gene_sets
head(gene_sets)
## # A tibble: 6 x 16
## gs_cat gs_subcat gs_name gene_symbol entrez_gene ensembl_gene human_gene_symb~
## <chr> <chr> <chr> <chr> <int> <chr> <chr>
## 1 C5 GO:BP GOBP_1~ AASDHPPT 60496 ENSG0000014~ AASDHPPT
## 2 C5 GO:BP GOBP_1~ ALDH1L1 10840 ENSG0000014~ ALDH1L1
## 3 C5 GO:BP GOBP_1~ ALDH1L2 160428 ENSG0000013~ ALDH1L2
## 4 C5 GO:BP GOBP_1~ MTHFD1 4522 ENSG0000010~ MTHFD1
## 5 C5 GO:BP GOBP_1~ MTHFD1L 25902 ENSG0000012~ MTHFD1L
## 6 C5 GO:BP GOBP_1~ MTHFD2L 441024 ENSG0000016~ MTHFD2L
## # ... with 9 more variables: human_entrez_gene <int>, human_ensembl_gene <chr>,
## # gs_id <chr>, gs_pmid <chr>, gs_geoid <chr>, gs_exact_source <chr>,
## # gs_url <chr>, gs_description <chr>, category <chr>
How many gene sets ?
gene_sets[, c("gs_subcat", "gs_name")] %>%
dplyr::distinct() %>%
dplyr::pull(gs_subcat) %>%
table() %>%
as.data.frame.table() %>%
`colnames<-`(c("Category", "Nb gene sets"))
## Category Nb gene sets
## 1 50
## 2 CP:KEGG 186
## 3 CP:PID 196
## 4 CP:REACTOME 1615
## 5 CP:WIKIPATHWAYS 664
## 6 GO:BP 7658
## 7 GO:CC 1006
## 8 GO:MF 1738
We get gene name and gene ID correspondence :
gene_corresp = sobj@assays[["RNA"]]@meta.features[, c("gene_name", "Ensembl_ID")] %>%
`colnames<-`(c("NAME", "ID")) %>%
dplyr::mutate(ID = as.character(ID))
rownames(gene_corresp) = gene_corresp$ID
head(gene_corresp)
## NAME ID
## ENSG00000238009 AL627309.1 ENSG00000238009
## ENSG00000237491 AL669831.5 ENSG00000237491
## ENSG00000225880 LINC00115 ENSG00000225880
## ENSG00000230368 FAM41C ENSG00000230368
## ENSG00000187634 SAMD11 ENSG00000187634
## ENSG00000188976 NOC2L ENSG00000188976
group_name = "Langerhans cells"
Langerhans cells are those clusters :
clusters_oi = names(which(cell_type_clusters == "Langerhans cells"))
clusters_oi
## [1] "3" "7" "8" "12"
We represent those clusters on the projection :
see_clusters("Langerhans cells")
We perform differential expression between HS and HD, within this population :
subsobj = subset(sobj, seurat_clusters %in% c(3, 8))
Seurat::Idents(subsobj) = subsobj$sample_type
table(subsobj$sample_type)
##
## HS HD
## 148 57
We make identify specific markers for these group :
mark = Seurat::FindMarkers(subsobj, ident.1 = "HS", ident.2 = "HD")
mark = mark %>%
dplyr::filter(p_val_adj < 0.05) %>%
dplyr::arrange(-avg_logFC, pct.1 - pct.2)
list_results[[group_name]]$mark = mark
dim(mark)
## [1] 12 5
head(mark, n = 20)
## p_val avg_logFC pct.1 pct.2 p_val_adj
## RPS28 1.761567e-07 0.6392986 0.919 0.842 2.663665e-03
## TMSB10 1.819343e-06 0.5402961 0.966 0.877 2.751029e-02
## HLA-DQA1 2.234450e-07 -0.4536573 0.932 0.947 3.378712e-03
## ZNF302 1.750968e-06 -0.6587976 0.291 0.632 2.647639e-02
## NCALD 3.027328e-07 -0.6827688 0.115 0.439 4.577622e-03
## WDR66 1.286711e-09 -0.8234062 0.176 0.596 1.945635e-05
## GPM6A 2.527528e-07 -0.8876557 0.128 0.456 3.821875e-03
## PER1 2.498950e-06 -1.0169989 0.122 0.386 3.778662e-02
## JUN 1.994633e-07 -1.1092696 0.466 0.737 3.016084e-03
## ACTR3C 5.761218e-07 -1.1418367 0.061 0.316 8.711537e-03
## ZFP36L2 6.359128e-07 -1.1479119 0.486 0.702 9.615638e-03
## TSC22D3 5.439881e-09 -1.2658959 0.426 0.737 8.225644e-05
What are the genes up-regulated in HS ?
genes_of_interest = mark %>%
dplyr::filter(avg_logFC > 0) %>%
rownames()
genes_of_interest
## [1] "RPS28" "TMSB10"
What are the genes up-regulated in HD ?
genes_of_interest = mark %>%
dplyr::filter(avg_logFC < 0) %>%
rownames()
genes_of_interest
## [1] "HLA-DQA1" "ZNF302" "NCALD" "WDR66" "GPM6A" "PER1"
## [7] "JUN" "ACTR3C" "ZFP36L2" "TSC22D3"
We run a GSEA for all gene sets, from the full count matrix :
ranked_gene_list = aquarius::run_foldchange(Seurat::GetAssayData(subsobj, assay = "RNA", slot = "counts"),
group1 = colnames(subsobj)[subsobj@active.ident %in% "HS"],
group2 = colnames(subsobj)[subsobj@active.ident %in% "HD"])
names(ranked_gene_list) = gene_corresp$ID
gsea_results = aquarius::gsea_run(ranked_gene_list = ranked_gene_list,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
GSEA_p_val_thresh = 1)
list_results[[group_name]]$gsea = gsea_results
gsea_results@result %>%
dplyr::filter(pvalue < 0.05) %>%
dplyr::top_n(., n = 200, wt = abs(NES)) %>%
dplyr::mutate(too_long = ifelse(nchar(ID) > 60, yes = TRUE, no = FALSE)) %>%
dplyr::mutate(ID = stringr::str_sub(ID, end = 60)) %>%
dplyr::mutate(ID = ifelse(too_long, yes = paste0(ID, "..."), no = ID)) %>%
aquarius::gsea_plot(show_legend = TRUE) +
ggplot2::labs(title = "GSEA using all genes (count matrix)") +
ggplot2::theme(plot.title = element_text(size = 20))
We compute a fold change table to make a wordcloud :
fold_change = gene_corresp
colnames(fold_change) = c("gene_name", "ID")
rownames(fold_change) = fold_change$ID
fold_change$FC = ranked_gene_list[rownames(fold_change)]
fold_change$pct.1 = Seurat::GetAssayData(subsobj, assay = "RNA", slot = "counts")[, subsobj@active.ident == "HS"] %>%
apply(., MARGIN = 1, FUN = function(one_row) {
return( mean(one_row != 0) )
})
fold_change$pct.2 = Seurat::GetAssayData(subsobj, assay = "RNA", slot = "counts")[, subsobj@active.ident == "HD"] %>%
apply(., MARGIN = 1, FUN = function(one_row) {
return( mean(one_row != 0) )
})
fold_change$FC_x_pct = ifelse(fold_change$FC > 0,
yes = fold_change$FC * fold_change$pct.1,
no = fold_change$FC * fold_change$pct.2)
dim(fold_change) ; head(fold_change)
## [1] 15121 6
## gene_name ID FC pct.1 pct.2
## ENSG00000238009 AL627309.1 ENSG00000238009 -1.8876775 0.00000000 0.0000000
## ENSG00000237491 AL669831.5 ENSG00000237491 -2.4022507 0.04054054 0.1052632
## ENSG00000225880 LINC00115 ENSG00000225880 -1.3731043 0.05405405 0.0877193
## ENSG00000230368 FAM41C ENSG00000230368 1.2822475 0.05405405 0.0000000
## ENSG00000187634 SAMD11 ENSG00000187634 -1.8876775 0.00000000 0.0000000
## ENSG00000188976 NOC2L ENSG00000188976 -0.7807623 0.16216216 0.1754386
## FC_x_pct
## ENSG00000238009 0.00000000
## ENSG00000237491 -0.25286849
## ENSG00000225880 -0.12044775
## ENSG00000230368 0.06931068
## ENSG00000187634 0.00000000
## ENSG00000188976 -0.13697584
We make the gsea plot for some gene sets :
gs_oi = c("GOBP_ANTIGEN_PROCESSING_AND_PRESENTATION_VIA_MHC_CLASS_IB",
"GOCC_MHC_CLASS_I_PROTEIN_COMPLEX",
"GOBP_REGULATION_OF_DENDRITIC_CELL_DIFFERENTIATION",
"GOBP_XENOPHAGY",
"REACTOME_NCAM1_INTERACTIONS",
"GOCC_T_CELL_RECEPTOR_COMPLEX")
plot_list = make_gsea_plot(gsea_results, gs_oi, fold_change, "FC_x_pct")
patchwork::wrap_plots(plot_list, ncol = 2, widths = c(2,1.5))
group_name = "macrophages"
Macrophages are those clusters :
clusters_oi = names(which(cell_type_clusters == "macrophages"))
clusters_oi
## [1] "2" "11"
We represent those clusters on the projection :
see_clusters("macrophages")
We perform differential expression between HS and HD, within this population :
subsobj = subset(sobj, seurat_clusters %in% c(2))
Seurat::Idents(subsobj) = subsobj$sample_type
table(subsobj$sample_type)
##
## HS HD
## 378 31
We make identify specific markers for these group :
mark = Seurat::FindMarkers(subsobj, ident.1 = "HS", ident.2 = "HD")
mark = mark %>%
dplyr::filter(p_val_adj < 0.05) %>%
dplyr::arrange(-avg_logFC, pct.1 - pct.2)
list_results[[group_name]]$mark = mark
dim(mark)
## [1] 47 5
head(mark, n = 20)
## p_val avg_logFC pct.1 pct.2 p_val_adj
## HLA-DRB5 1.631166e-14 1.6933362 0.963 0.226 2.466487e-10
## HLA-C 1.656456e-18 1.6046388 0.995 0.710 2.504727e-14
## MTRNR2L12 5.065078e-11 0.9147492 0.989 1.000 7.658905e-07
## RPS26 1.257519e-06 0.7792169 0.995 0.968 1.901495e-02
## MTRNR2L10 1.748459e-07 0.7368945 0.804 0.355 2.643845e-03
## MTRNR2L8 3.214200e-07 0.7163832 0.968 0.871 4.860192e-03
## HLA-DQA2 1.009694e-07 0.7077588 0.772 0.194 1.526759e-03
## C1QC 4.803251e-11 0.6511403 1.000 1.000 7.262995e-07
## C1QA 3.100723e-11 0.6175805 1.000 0.968 4.688603e-07
## B2M 5.202266e-14 0.5888569 1.000 1.000 7.866346e-10
## TMSB4X 1.177656e-13 0.5886220 1.000 1.000 1.780733e-09
## HLA-A 8.822978e-09 0.5814968 1.000 1.000 1.334123e-04
## C1QB 1.053374e-08 0.5424144 0.997 1.000 1.592806e-04
## HLA-DPA1 1.267576e-06 0.3537871 1.000 1.000 1.916701e-02
## RPL23A 2.907519e-06 0.2998397 1.000 1.000 4.396459e-02
## CHST13 1.541856e-09 -0.2636116 0.013 0.194 2.331440e-05
## RPS29 4.606266e-08 -0.3696506 0.997 1.000 6.965134e-04
## NCALD 1.703572e-08 -0.3733028 0.098 0.452 2.575971e-04
## MT-CYB 3.008289e-07 -0.3740895 0.989 1.000 4.548834e-03
## VEGFA 2.205237e-07 -0.4069963 0.079 0.355 3.334539e-03
We explore enrichment in gene sets for HS population.
genes_of_interest = mark %>%
dplyr::filter(avg_logFC > 0) %>%
rownames()
enrichr_results = aquarius::run_enrichr(gene_names = genes_of_interest,
gene_corresp = gene_corresp,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
make_plot = TRUE,
plot_title = "Up-regulated in HS compared to HD")
list_results[[group_name]]$enrichr_hs = enrichr_results$ego
enrichr_results$plot +
ggplot2::theme(axis.text.y = element_text(size = 8))
We explore enrichment in gene sets for HD population.
genes_of_interest = mark %>%
dplyr::filter(avg_logFC < 0) %>%
rownames()
enrichr_results = aquarius::run_enrichr(gene_names = genes_of_interest,
gene_corresp = gene_corresp,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
make_plot = TRUE,
plot_title = "Down-regulated in HS compared to HD")
list_results[[group_name]]$enrichr_hd = enrichr_results$ego
enrichr_results$plot +
ggplot2::theme(axis.text.y = element_text(size = 8))
We run a GSEA for all gene sets, from the full count matrix :
ranked_gene_list = aquarius::run_foldchange(Seurat::GetAssayData(subsobj, assay = "RNA", slot = "counts"),
group1 = colnames(subsobj)[subsobj@active.ident %in% "HS"],
group2 = colnames(subsobj)[subsobj@active.ident %in% "HD"])
names(ranked_gene_list) = gene_corresp$ID
gsea_results = aquarius::gsea_run(ranked_gene_list = ranked_gene_list,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
GSEA_p_val_thresh = 1)
list_results[[group_name]]$gsea = gsea_results
gsea_results@result %>%
dplyr::filter(pvalue < 0.05) %>%
dplyr::top_n(., n = 200, wt = abs(NES)) %>%
dplyr::mutate(too_long = ifelse(nchar(ID) > 70, yes = TRUE, no = FALSE)) %>%
dplyr::mutate(ID = stringr::str_sub(ID, end = 70)) %>%
dplyr::mutate(ID = ifelse(too_long, yes = paste0(ID, "..."), no = ID)) %>%
aquarius::gsea_plot(show_legend = TRUE) +
ggplot2::labs(title = "GSEA using all genes (count matrix)") +
ggplot2::theme(plot.title = element_text(size = 20))
We compute a fold change table to make a wordcloud :
fold_change = gene_corresp
colnames(fold_change) = c("gene_name", "ID")
rownames(fold_change) = fold_change$ID
fold_change$FC = ranked_gene_list[rownames(fold_change)]
fold_change$pct.1 = Seurat::GetAssayData(subsobj, assay = "RNA", slot = "counts")[, subsobj@active.ident == "HS"] %>%
apply(., MARGIN = 1, FUN = function(one_row) {
return( mean(one_row != 0) )
})
fold_change$pct.2 = Seurat::GetAssayData(subsobj, assay = "RNA", slot = "counts")[, subsobj@active.ident == "HD"] %>%
apply(., MARGIN = 1, FUN = function(one_row) {
return( mean(one_row != 0) )
})
fold_change$FC_x_pct = ifelse(fold_change$FC > 0,
yes = fold_change$FC * fold_change$pct.1,
no = fold_change$FC * fold_change$pct.2)
dim(fold_change) ; head(fold_change)
## [1] 15121 6
## gene_name ID FC pct.1 pct.2
## ENSG00000238009 AL627309.1 ENSG00000238009 -3.06769505 0.002645503 0.00000000
## ENSG00000237491 AL669831.5 ENSG00000237491 -0.48273255 0.145502646 0.12903226
## ENSG00000225880 LINC00115 ENSG00000225880 -0.06769505 0.076719577 0.03225806
## ENSG00000230368 FAM41C ENSG00000230368 1.51726745 0.113756614 0.00000000
## ENSG00000187634 SAMD11 ENSG00000187634 -3.06769505 0.002645503 0.00000000
## ENSG00000188976 NOC2L ENSG00000188976 0.39173657 0.283068783 0.16129032
## FC_x_pct
## ENSG00000238009 0.000000000
## ENSG00000237491 -0.062288070
## ENSG00000225880 -0.002183711
## ENSG00000230368 0.172599208
## ENSG00000187634 0.000000000
## ENSG00000188976 0.110888395
We make the gsea plot for some gene sets :
gs_oi = c("GOBP_B_CELL_MEDIATED_IMMUNITY",
"REACTOME_INTERFERON_ALPHA_BETA_SIGNALING",
"GOCC_MHC_PROTEIN_COMPLEX",
"GOMF_BETA_2_MICROGLOBULIN_BINDING",
"GOBP_REGULATION_OF_T_CELL_MEDIATED_IMMUNE_RESPONSE_TO_TUMOR_CELL",
"GOMF_MHC_CLASS_IB_RECEPTOR_ACTIVITY",
"REACTOME_NCAM1_INTERACTIONS",
"GOBP_NEURON_FATE_SPECIFICATION")
plot_list = make_gsea_plot(gsea_results, gs_oi, fold_change, "FC_x_pct")
patchwork::wrap_plots(plot_list, ncol = 2, widths = c(2,1.5))
group_name = "CD4 T cells"
CD4 T cells are those clusters :
clusters_oi = names(which(cell_type_clusters == "CD4 T cells"))
clusters_oi
## [1] "0" "4" "9" "10"
We represent those clusters on the projection :
see_clusters("CD4 T cells")
We perform differential expression between HS and HD, within cluster 0 only, because other clusters contain too few cells and have distinct expression profile from cluster 0 :
subsobj = subset(sobj, seurat_clusters %in% c(0))
Seurat::Idents(subsobj) = subsobj$sample_type
table(subsobj$sample_type)
##
## HS HD
## 524 79
We make identify specific markers for these group :
mark = Seurat::FindMarkers(subsobj, ident.1 = "HS", ident.2 = "HD")
mark = mark %>%
dplyr::filter(p_val_adj < 0.05) %>%
dplyr::arrange(-avg_logFC, pct.1 - pct.2)
list_results[[group_name]]$mark = mark
dim(mark)
## [1] 90 5
head(mark, n = 20)
## p_val avg_logFC pct.1 pct.2 p_val_adj
## GZMA 1.964994e-19 1.6362221 0.750 0.253 2.971268e-15
## RPS26 1.098328e-30 1.1912840 0.992 0.835 1.660782e-26
## HLA-C 3.163130e-20 0.9575722 0.952 0.696 4.782969e-16
## KLRB1 6.290488e-08 0.6979863 0.760 0.418 9.511846e-04
## ABRACL 2.349188e-07 0.5919547 0.651 0.392 3.552208e-03
## STK17A 1.597330e-09 0.5617681 0.775 0.494 2.415322e-05
## CLEC2B 6.187239e-07 0.5504522 0.443 0.127 9.355724e-03
## CD3D 6.816875e-10 0.4786997 0.979 0.924 1.030780e-05
## NDUFS5 6.719076e-07 0.4705508 0.718 0.519 1.015991e-02
## CD2 1.358823e-08 0.4418964 0.969 0.911 2.054676e-04
## CYBA 1.168838e-07 0.4097895 0.931 0.848 1.767399e-03
## ARPC3 3.609123e-07 0.4093346 0.882 0.772 5.457355e-03
## SH3BGRL3 1.347683e-10 0.3818926 0.996 0.962 2.037832e-06
## SERF2 1.473128e-08 0.3801104 0.969 0.899 2.227516e-04
## TMSB4X 5.977030e-11 0.3493581 1.000 1.000 9.037868e-07
## H3F3A 2.522627e-07 0.3272609 0.983 0.949 3.814464e-03
## CFL1 8.256907e-08 0.3240998 0.979 0.975 1.248527e-03
## B2M 4.670220e-17 0.3124388 1.000 1.000 7.061839e-13
## TPT1 9.984271e-14 0.3056347 1.000 1.000 1.509722e-09
## RPS27 5.899066e-13 0.3037666 1.000 1.000 8.919978e-09
We explore enrichment in gene sets for HS population.
genes_of_interest = mark %>%
dplyr::filter(avg_logFC > 0) %>%
rownames()
enrichr_results = aquarius::run_enrichr(gene_names = genes_of_interest,
gene_corresp = gene_corresp,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
make_plot = TRUE,
plot_title = "Up-regulated in HS compared to HD")
list_results[[group_name]]$enrichr_hs = enrichr_results$ego
enrichr_results$plot +
ggplot2::theme(axis.text.y = element_text(size = 8))
We explore enrichment in gene sets for HD population.
genes_of_interest = mark %>%
dplyr::filter(avg_logFC < 0) %>%
rownames()
enrichr_results = aquarius::run_enrichr(gene_names = genes_of_interest,
gene_corresp = gene_corresp,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
make_plot = TRUE,
plot_title = "Down-regulated in HS compared to HD")
list_results[[group_name]]$enrichr_hd = enrichr_results$ego
enrichr_results$plot +
ggplot2::theme(axis.text.y = element_text(size = 8))
We run a GSEA for all gene sets, from the full count matrix :
ranked_gene_list = aquarius::run_foldchange(Seurat::GetAssayData(subsobj, assay = "RNA", slot = "counts"),
group1 = colnames(subsobj)[subsobj@active.ident %in% "HS"],
group2 = colnames(subsobj)[subsobj@active.ident %in% "HD"])
names(ranked_gene_list) = gene_corresp$ID
gsea_results = aquarius::gsea_run(ranked_gene_list = ranked_gene_list,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
GSEA_p_val_thresh = 1)
list_results[[group_name]]$gsea = gsea_results
gsea_results@result %>%
dplyr::filter(pvalue < 0.05) %>%
dplyr::top_n(., n = 200, wt = abs(NES)) %>%
dplyr::mutate(too_long = ifelse(nchar(ID) > 60, yes = TRUE, no = FALSE)) %>%
dplyr::mutate(ID = stringr::str_sub(ID, end = 60)) %>%
dplyr::mutate(ID = ifelse(too_long, yes = paste0(ID, "..."), no = ID)) %>%
aquarius::gsea_plot(show_legend = TRUE) +
ggplot2::labs(title = "GSEA using all genes (count matrix)") +
ggplot2::theme(plot.title = element_text(size = 20))
We compute a fold change table to make a wordcloud :
fold_change = gene_corresp
colnames(fold_change) = c("gene_name", "ID")
rownames(fold_change) = fold_change$ID
fold_change$FC = ranked_gene_list[rownames(fold_change)]
fold_change$pct.1 = Seurat::GetAssayData(subsobj, assay = "RNA", slot = "counts")[, subsobj@active.ident == "HS"] %>%
apply(., MARGIN = 1, FUN = function(one_row) {
return( mean(one_row != 0) )
})
fold_change$pct.2 = Seurat::GetAssayData(subsobj, assay = "RNA", slot = "counts")[, subsobj@active.ident == "HD"] %>%
apply(., MARGIN = 1, FUN = function(one_row) {
return( mean(one_row != 0) )
})
fold_change$FC_x_pct = ifelse(fold_change$FC > 0,
yes = fold_change$FC * fold_change$pct.1,
no = fold_change$FC * fold_change$pct.2)
dim(fold_change) ; head(fold_change)
## [1] 15121 6
## gene_name ID FC pct.1 pct.2
## ENSG00000238009 AL627309.1 ENSG00000238009 -1.1032762 0.003816794 0.00000000
## ENSG00000237491 AL669831.5 ENSG00000237491 -1.3097270 0.022900763 0.05063291
## ENSG00000225880 LINC00115 ENSG00000225880 -1.5507351 0.015267176 0.05063291
## ENSG00000230368 FAM41C ENSG00000230368 -1.6882387 0.001908397 0.00000000
## ENSG00000187634 SAMD11 ENSG00000187634 -2.6882387 0.000000000 0.00000000
## ENSG00000188976 NOC2L ENSG00000188976 0.4615085 0.112595420 0.07594937
## FC_x_pct
## ENSG00000238009 0.00000000
## ENSG00000237491 -0.06631529
## ENSG00000225880 -0.07851823
## ENSG00000230368 0.00000000
## ENSG00000187634 0.00000000
## ENSG00000188976 0.05196374
We make the gsea plot for some gene sets :
gs_oi = c("REACTOME_IMMUNOREGULATORY_INTERACTIONS_BETWEEN_A_LYMPHOID_AND_A_NON_LYMPHOID_CELL",
"PID_RAC1_PATHWAY",
"REACTOME_PD_1_SIGNALING",
"WP_CANCER_IMMUNOTHERAPY_BY_PD1_BLOCKADE",
"GOCC_CYTOLYTIC_GRANULE",
"GOBP_GRANZYME_MEDIATED_PROGRAMMED_CELL_DEATH_SIGNALING_PATHWAY",
"REACTOME_INTERLEUKIN_9_SIGNALING",
"GOMF_INHIBITORY_MHC_CLASS_I_RECEPTOR_ACTIVITY",
"REACTOME_COMPLEMENT_CASCADE",
"HALLMARK_TNFA_SIGNALING_VIA_NFKB",
"WP_NEUROINFLAMMATION")
plot_list = make_gsea_plot(gsea_results, gs_oi, fold_change, "FC_x_pct")
patchwork::wrap_plots(plot_list, ncol = 2, widths = c(2,1.5))
group_name = "CD8 T cells"
CD8 T cells are those clusters :
clusters_oi = names(which(cell_type_clusters == "CD8 T cells"))
clusters_oi
## [1] "1" "5" "6"
We represent those clusters on the projection :
see_clusters("CD8 T cells")
We perform differential expression between HS and HD, within cluster 1 only, because other clusters contain too few cells and have distinct expression profile from cluster 1 :
subsobj = subset(sobj, seurat_clusters %in% c(1))
Seurat::Idents(subsobj) = subsobj$sample_type
table(subsobj$sample_type)
##
## HS HD
## 361 82
We make identify specific markers for these group :
mark = Seurat::FindMarkers(subsobj, ident.1 = "HS", ident.2 = "HD")
mark = mark %>%
dplyr::filter(p_val_adj < 0.05) %>%
dplyr::arrange(-avg_logFC, pct.1 - pct.2)
list_results[[group_name]]$mark = mark
dim(mark)
## [1] 61 5
head(mark, n = 20)
## p_val avg_logFC pct.1 pct.2 p_val_adj
## RPS26 3.309407e-38 1.4312432 0.986 0.866 5.004155e-34
## HLA-C 4.952396e-25 1.1772438 0.936 0.549 7.488517e-21
## KLRC1 2.997716e-08 0.8124008 0.388 0.061 4.532846e-04
## TMEM154 2.827158e-07 0.7974845 0.338 0.061 4.274946e-03
## KLRB1 5.141186e-19 0.7927007 0.961 0.927 7.773987e-15
## GBP5 3.845596e-08 0.7712944 0.460 0.134 5.814926e-04
## LINC02195 8.195677e-07 0.7136043 0.260 0.012 1.239268e-02
## CTSW 1.852837e-09 0.6638753 0.820 0.549 2.801674e-05
## CD8A 7.446961e-07 0.6525479 0.380 0.085 1.126055e-02
## EPHB6 1.602297e-06 0.6521750 0.518 0.232 2.422833e-02
## RPS27L 1.901202e-06 0.6374235 0.593 0.317 2.874808e-02
## GZMA 1.964021e-06 0.6100182 0.740 0.488 2.969796e-02
## DYNLL1 1.271236e-07 0.5895053 0.676 0.378 1.922236e-03
## MTRNR2L12 1.277002e-07 0.5500563 0.986 0.963 1.930954e-03
## RPS19 6.390492e-11 0.4413521 0.997 1.000 9.663063e-07
## ACTG1 1.365204e-08 0.4375325 0.992 0.951 2.064324e-04
## RPS27 6.308878e-16 0.3647799 1.000 1.000 9.539655e-12
## HLA-A 4.398120e-07 0.3026910 0.997 1.000 6.650397e-03
## ACTB 1.195282e-06 0.2961452 0.997 1.000 1.807385e-02
## B2M 3.195644e-15 0.2808143 1.000 1.000 4.832133e-11
We explore enrichment in gene sets for HS population.
genes_of_interest = mark %>%
dplyr::filter(avg_logFC > 0) %>%
rownames()
enrichr_results = aquarius::run_enrichr(gene_names = genes_of_interest,
gene_corresp = gene_corresp,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
make_plot = TRUE,
plot_title = "Up-regulated in HS compared to HD")
list_results[[group_name]]$enrichr_hs = enrichr_results$ego
enrichr_results$plot +
ggplot2::theme(axis.text.y = element_text(size = 8))
We explore enrichment in gene sets for HD population.
genes_of_interest = mark %>%
dplyr::filter(avg_logFC < 0) %>%
rownames()
enrichr_results = aquarius::run_enrichr(gene_names = genes_of_interest,
gene_corresp = gene_corresp,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
make_plot = TRUE,
plot_title = "Down-regulated in HS compared to HD")
list_results[[group_name]]$enrichr_hd = enrichr_results$ego
enrichr_results$plot +
ggplot2::theme(axis.text.y = element_text(size = 8))
We run a GSEA for all gene sets, from the full count matrix :
ranked_gene_list = aquarius::run_foldchange(Seurat::GetAssayData(subsobj, assay = "RNA", slot = "counts"),
group1 = colnames(subsobj)[subsobj@active.ident %in% "HS"],
group2 = colnames(subsobj)[subsobj@active.ident %in% "HD"])
names(ranked_gene_list) = gene_corresp$ID
gsea_results = aquarius::gsea_run(ranked_gene_list = ranked_gene_list,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
GSEA_p_val_thresh = 1)
list_results[[group_name]]$gsea = gsea_results
gsea_results@result %>%
dplyr::filter(pvalue < 0.05) %>%
dplyr::top_n(., n = 200, wt = abs(NES)) %>%
dplyr::mutate(too_long = ifelse(nchar(ID) > 60, yes = TRUE, no = FALSE)) %>%
dplyr::mutate(ID = stringr::str_sub(ID, end = 60)) %>%
dplyr::mutate(ID = ifelse(too_long, yes = paste0(ID, "..."), no = ID)) %>%
aquarius::gsea_plot(show_legend = TRUE) +
ggplot2::labs(title = "GSEA using all genes (count matrix)") +
ggplot2::theme(plot.title = element_text(size = 20))
We compute a fold change table to make a wordcloud :
fold_change = gene_corresp
colnames(fold_change) = c("gene_name", "ID")
rownames(fold_change) = fold_change$ID
fold_change$FC = ranked_gene_list[rownames(fold_change)]
fold_change$pct.1 = Seurat::GetAssayData(subsobj, assay = "RNA", slot = "counts")[, subsobj@active.ident == "HS"] %>%
apply(., MARGIN = 1, FUN = function(one_row) {
return( mean(one_row != 0) )
})
fold_change$pct.2 = Seurat::GetAssayData(subsobj, assay = "RNA", slot = "counts")[, subsobj@active.ident == "HD"] %>%
apply(., MARGIN = 1, FUN = function(one_row) {
return( mean(one_row != 0) )
})
fold_change$FC_x_pct = ifelse(fold_change$FC > 0,
yes = fold_change$FC * fold_change$pct.1,
no = fold_change$FC * fold_change$pct.2)
dim(fold_change) ; head(fold_change)
## [1] 15121 6
## gene_name ID FC pct.1 pct.2
## ENSG00000238009 AL627309.1 ENSG00000238009 -0.6062212 0.005540166 0.00000000
## ENSG00000237491 AL669831.5 ENSG00000237491 0.1307444 0.022160665 0.01219512
## ENSG00000225880 LINC00115 ENSG00000225880 -1.3431868 0.022160665 0.04878049
## ENSG00000230368 FAM41C ENSG00000230368 -0.1911837 0.008310249 0.00000000
## ENSG00000187634 SAMD11 ENSG00000187634 -1.4542181 0.011080332 0.02439024
## ENSG00000188976 NOC2L ENSG00000188976 -0.7317521 0.085872576 0.13414634
## FC_x_pct
## ENSG00000238009 0.000000000
## ENSG00000237491 0.002897383
## ENSG00000225880 -0.065521307
## ENSG00000230368 0.000000000
## ENSG00000187634 -0.035468734
## ENSG00000188976 -0.098161863
We make the gsea plot for some gene sets :
gs_oi = c("REACTOME_IMMUNOREGULATORY_INTERACTIONS_BETWEEN_A_LYMPHOID_AND_A_NON_LYMPHOID_CELL",
"PID_IL12_2PATHWAY",
"REACTOME_INTERFERON_GAMMA_SIGNALING",
"GOCC_CYTOLYTIC_GRANULE",
"GOBP_NATURAL_KILLER_CELL_ACTIVATION_INVOLVED_IN_IMMUNE_RESPONSE",
"GOBP_ANTIBACTERIAL_HUMORAL_RESPONSE",
"WP_NEUROINFLAMMATION",
"HALLMARK_HYPOXIA")
plot_list = make_gsea_plot(gsea_results, gs_oi, fold_change, "FC_x_pct")
patchwork::wrap_plots(plot_list, ncol = 2, widths = c(2,1.5))
We represent differentially expressed genes, only in the four populations of interest :
sobj = subset(sobj, cluster_type %in% c("B cells", "proliferative"), invert = TRUE)
sobj
## An object of class Seurat
## 15121 features across 2262 samples within 1 assay
## Active assay: RNA (15121 features, 2000 variable features)
## 6 dimensional reductions calculated: RNA_pca, RNA_pca_20_tsne, RNA_pca_20_umap, harmony, harmony_20_umap, harmony_20_tsne
We extract all DE genes :
features_oi = lapply(list_results, `[[`, 1) %>%
lapply(., FUN = rownames) %>%
unlist() %>% unname() %>% unique()
length(features_oi)
## [1] 160
We prepare the scaled expression matrix :
mat_expression = Seurat::GetAssayData(sobj, assay = "RNA", slot = "data")[features_oi, ]
mat_expression = Matrix::t(mat_expression)
mat_expression = dynutils::scale_quantile(mat_expression) # between 0 and 1
mat_expression = Matrix::t(mat_expression)
mat_expression = as.matrix(mat_expression) # not sparse
dim(mat_expression)
## [1] 160 2262
We prepare the heatmap annotation :
ha_top = ComplexHeatmap::HeatmapAnnotation(
cell_type = sobj$cluster_type,
sample_type = sobj$sample_type,
cluster = sobj$seurat_clusters,
col = list(cell_type = color_markers,
sample_type = setNames(nm = c("HS", "HD"),
c("#C55F40", "#2C78E6")),
cluster = setNames(nm = levels(sobj$seurat_clusters),
aquarius::gg_color_hue(length(levels(sobj$seurat_clusters))))))
And the heatmap :
sobj$cell_group = paste0(sobj$cluster_type, sobj$sample_type) %>%
as.factor()
ht = ComplexHeatmap::Heatmap(mat_expression,
col = aquarius::color_cnv,
# Annotation
top_annotation = ha_top,
# Grouping
column_order = sobj@meta.data %>%
dplyr::arrange(cluster_type, sample_type, seurat_clusters) %>%
rownames(),
column_split = sobj$cell_group,
column_gap = rep(unit(c(0.01, 2), "mm"), 4),
column_title = NULL,
cluster_rows = FALSE,
cluster_columns = FALSE,
show_column_names = FALSE,
# Visual aspect
show_heatmap_legend = TRUE,
border = TRUE)
ComplexHeatmap::draw(ht,
merge_legend = TRUE,
heatmap_legend_side = "bottom",
annotation_legend_side = "bottom")
Seurat::DotPlot(sobj,
assay = "RNA",
features = features_oi,
group.by = "cell_group") +
ggplot2::coord_flip() +
ggplot2::scale_color_gradientn(colors = aquarius::color_gene) +
ggplot2::theme(axis.title.x = element_blank(),
axis.title.y = element_blank(),
axis.text.x = element_text(angle = 30, hjust = 1))
We save the list of results :
saveRDS(list_results, file = paste0(out_dir, "/", save_name, "_list_results.rds"))
## R version 3.6.3 (2020-02-29)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04.6 LTS
##
## Matrix products: default
## BLAS: /usr/local/lib/R/lib/libRblas.so
## LAPACK: /usr/local/lib/R/lib/libRlapack.so
##
## locale:
## [1] C
##
## attached base packages:
## [1] grid stats graphics grDevices utils datasets methods
## [8] base
##
## other attached packages:
## [1] ComplexHeatmap_2.14.0 ggplot2_3.3.5 patchwork_1.1.2
## [4] dplyr_1.0.7
##
## loaded via a namespace (and not attached):
## [1] softImpute_1.4 graphlayouts_0.7.0
## [3] pbapply_1.4-2 lattice_0.20-41
## [5] haven_2.3.1 vctrs_0.3.8
## [7] usethis_2.0.1 dynwrap_1.2.1
## [9] blob_1.2.1 survival_3.2-13
## [11] prodlim_2019.11.13 dynutils_1.0.5
## [13] later_1.3.0 DBI_1.1.1
## [15] R.utils_2.11.0 SingleCellExperiment_1.8.0
## [17] rappdirs_0.3.3 uwot_0.1.8
## [19] dqrng_0.2.1 jpeg_0.1-8.1
## [21] zlibbioc_1.32.0 pspline_1.0-18
## [23] pcaMethods_1.78.0 mvtnorm_1.1-1
## [25] htmlwidgets_1.5.4 GlobalOptions_0.1.2
## [27] future_1.22.1 UpSetR_1.4.0
## [29] laeken_0.5.2 leiden_0.3.3
## [31] clustree_0.4.3 parallel_3.6.3
## [33] scater_1.14.6 irlba_2.3.3
## [35] markdown_1.1 DEoptimR_1.0-9
## [37] tidygraph_1.1.2 Rcpp_1.0.9
## [39] readr_2.0.2 KernSmooth_2.23-17
## [41] carrier_0.1.0 promises_1.1.0
## [43] gdata_2.18.0 DelayedArray_0.12.3
## [45] limma_3.42.2 graph_1.64.0
## [47] RcppParallel_5.1.4 Hmisc_4.4-0
## [49] fs_1.5.2 RSpectra_0.16-0
## [51] fastmatch_1.1-0 ranger_0.12.1
## [53] digest_0.6.25 png_0.1-7
## [55] sctransform_0.2.1 cowplot_1.0.0
## [57] DOSE_3.12.0 here_1.0.1
## [59] TInGa_0.0.0.9000 ggraph_2.0.3
## [61] pkgconfig_2.0.3 GO.db_3.10.0
## [63] DelayedMatrixStats_1.8.0 gower_0.2.1
## [65] ggbeeswarm_0.6.0 iterators_1.0.12
## [67] DropletUtils_1.6.1 reticulate_1.26
## [69] clusterProfiler_3.14.3 SummarizedExperiment_1.16.1
## [71] circlize_0.4.15 beeswarm_0.4.0
## [73] GetoptLong_1.0.5 xfun_0.35
## [75] bslib_0.3.1 zoo_1.8-10
## [77] tidyselect_1.1.0 reshape2_1.4.4
## [79] purrr_0.3.4 ica_1.0-2
## [81] pcaPP_1.9-73 viridisLite_0.3.0
## [83] rtracklayer_1.46.0 rlang_1.0.2
## [85] hexbin_1.28.1 jquerylib_0.1.4
## [87] dyneval_0.9.9 glue_1.4.2
## [89] RColorBrewer_1.1-2 matrixStats_0.56.0
## [91] stringr_1.4.0 lava_1.6.7
## [93] europepmc_0.3 DESeq2_1.26.0
## [95] recipes_0.1.17 labeling_0.3
## [97] httpuv_1.5.2 class_7.3-17
## [99] BiocNeighbors_1.4.2 DO.db_2.9
## [101] annotate_1.64.0 jsonlite_1.7.2
## [103] XVector_0.26.0 bit_4.0.4
## [105] mime_0.9 aquarius_0.1.5
## [107] Rsamtools_2.2.3 gridExtra_2.3
## [109] gplots_3.0.3 stringi_1.4.6
## [111] processx_3.5.2 gsl_2.1-6
## [113] bitops_1.0-6 cli_3.0.1
## [115] batchelor_1.2.4 RSQLite_2.2.0
## [117] randomForest_4.6-14 tidyr_1.1.4
## [119] data.table_1.14.2 rstudioapi_0.13
## [121] org.Mm.eg.db_3.10.0 GenomicAlignments_1.22.1
## [123] nlme_3.1-147 qvalue_2.18.0
## [125] scran_1.14.6 locfit_1.5-9.4
## [127] scDblFinder_1.1.8 listenv_0.8.0
## [129] ggthemes_4.2.4 gridGraphics_0.5-0
## [131] R.oo_1.24.0 dbplyr_1.4.4
## [133] BiocGenerics_0.32.0 TTR_0.24.2
## [135] readxl_1.3.1 lifecycle_1.0.1
## [137] timeDate_3043.102 ggpattern_0.3.1
## [139] munsell_0.5.0 cellranger_1.1.0
## [141] R.methodsS3_1.8.1 proxyC_0.1.5
## [143] visNetwork_2.0.9 caTools_1.18.0
## [145] codetools_0.2-16 ggwordcloud_0.5.0
## [147] Biobase_2.46.0 GenomeInfoDb_1.22.1
## [149] vipor_0.4.5 lmtest_0.9-38
## [151] msigdbr_7.5.1 htmlTable_1.13.3
## [153] triebeard_0.3.0 lsei_1.2-0
## [155] xtable_1.8-4 ROCR_1.0-7
## [157] BiocManager_1.30.10 scatterplot3d_0.3-41
## [159] abind_1.4-5 farver_2.0.3
## [161] parallelly_1.28.1 RANN_2.6.1
## [163] askpass_1.1 GenomicRanges_1.38.0
## [165] RcppAnnoy_0.0.16 tibble_3.1.5
## [167] ggdendro_0.1-20 cluster_2.1.0
## [169] future.apply_1.5.0 Seurat_3.1.5
## [171] dendextend_1.15.1 Matrix_1.3-2
## [173] ellipsis_0.3.2 prettyunits_1.1.1
## [175] lubridate_1.7.9 ggridges_0.5.2
## [177] igraph_1.2.5 RcppEigen_0.3.3.7.0
## [179] fgsea_1.12.0 remotes_2.4.2
## [181] scBFA_1.0.0 destiny_3.0.1
## [183] VIM_6.1.1 testthat_3.1.0
## [185] htmltools_0.5.2 BiocFileCache_1.10.2
## [187] yaml_2.2.1 utf8_1.1.4
## [189] plotly_4.9.2.1 XML_3.99-0.3
## [191] ModelMetrics_1.2.2.2 e1071_1.7-3
## [193] foreign_0.8-76 withr_2.5.0
## [195] fitdistrplus_1.0-14 BiocParallel_1.20.1
## [197] xgboost_1.4.1.1 bit64_4.0.5
## [199] foreach_1.5.0 robustbase_0.93-9
## [201] Biostrings_2.54.0 GOSemSim_2.13.1
## [203] rsvd_1.0.3 memoise_2.0.0
## [205] evaluate_0.18 forcats_0.5.0
## [207] rio_0.5.16 geneplotter_1.64.0
## [209] tzdb_0.1.2 caret_6.0-86
## [211] ps_1.6.0 DiagrammeR_1.0.6.1
## [213] curl_4.3 fdrtool_1.2.15
## [215] fansi_0.4.1 highr_0.8
## [217] urltools_1.7.3 xts_0.12.1
## [219] GSEABase_1.48.0 acepack_1.4.1
## [221] edgeR_3.28.1 checkmate_2.0.0
## [223] scds_1.2.0 cachem_1.0.6
## [225] npsurv_0.4-0 babelgene_22.3
## [227] rjson_0.2.20 openxlsx_4.1.5
## [229] ggrepel_0.9.1 clue_0.3-60
## [231] rprojroot_2.0.2 stabledist_0.7-1
## [233] tools_3.6.3 sass_0.4.0
## [235] nichenetr_1.1.1 magrittr_2.0.1
## [237] RCurl_1.98-1.2 proxy_0.4-24
## [239] car_3.0-11 ape_5.3
## [241] ggplotify_0.0.5 xml2_1.3.2
## [243] httr_1.4.2 assertthat_0.2.1
## [245] rmarkdown_2.18 boot_1.3-25
## [247] globals_0.14.0 R6_2.4.1
## [249] Rhdf5lib_1.8.0 nnet_7.3-14
## [251] RcppHNSW_0.2.0 progress_1.2.2
## [253] genefilter_1.68.0 statmod_1.4.34
## [255] gtools_3.8.2 shape_1.4.6
## [257] HDF5Array_1.14.4 BiocSingular_1.2.2
## [259] rhdf5_2.30.1 splines_3.6.3
## [261] AUCell_1.8.0 carData_3.0-4
## [263] colorspace_1.4-1 generics_0.1.0
## [265] stats4_3.6.3 base64enc_0.1-3
## [267] dynfeature_1.0.0 smoother_1.1
## [269] gridtext_0.1.1 pillar_1.6.3
## [271] tweenr_1.0.1 sp_1.4-1
## [273] ggplot.multistats_1.0.0 rvcheck_0.1.8
## [275] GenomeInfoDbData_1.2.2 plyr_1.8.6
## [277] gtable_0.3.0 zip_2.2.0
## [279] knitr_1.41 latticeExtra_0.6-29
## [281] biomaRt_2.42.1 IRanges_2.20.2
## [283] fastmap_1.1.0 ADGofTest_0.3
## [285] copula_1.0-0 doParallel_1.0.15
## [287] AnnotationDbi_1.48.0 vcd_1.4-8
## [289] babelwhale_1.0.1 openssl_1.4.1
## [291] scales_1.1.1 backports_1.2.1
## [293] S4Vectors_0.24.4 ipred_0.9-12
## [295] enrichplot_1.6.1 hms_1.1.1
## [297] ggforce_0.3.1 Rtsne_0.15
## [299] shiny_1.7.1 numDeriv_2016.8-1.1
## [301] polyclip_1.10-0 lazyeval_0.2.2
## [303] Formula_1.2-3 tsne_0.1-3
## [305] crayon_1.3.4 MASS_7.3-54
## [307] pROC_1.16.2 viridis_0.5.1
## [309] dynparam_1.0.0 rpart_4.1-15
## [311] zinbwave_1.8.0 compiler_3.6.3
## [313] ggtext_0.1.0